package com.xyz.rok.tools.mapper;

import com.xyz.rok.tools.model.MemberStat;
import com.xyz.rok.tools.model.dto.StatDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MemberStatMapper {
    int deleteByPrimaryKey(Long id);

    int insert(MemberStat record);

    int insertSelective(MemberStat record);

    MemberStat selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(MemberStat record);

    int updateByPrimaryKey(MemberStat record);

    MemberStat selectByGameIdAndDay(@Param("gameId") Long gameId, @Param("day") Integer day);

    List<String> selectByServerIdUnionIdDay(@Param("serverId") Integer serverId, @Param("unionId") Long unionId, @Param("day") Integer day);

    List<StatDto> selectMemberStatDto(@Param("unionId") Long unionId, @Param("beginDate") Integer beginDate, @Param("endDate") Integer endDate);

    List<StatDto> selectMemberStatDtoByDay(@Param("unionId") Long unionId, @Param("server") Integer server, @Param("day") Integer day, @Param("orderBy") String orderBy);

    List<StatDto> selectMemberDKPByDay(@Param("unionId") Long unionId, @Param("server") Integer server, @Param("day") Integer day, @Param("t4Kill") Integer t4Kill, @Param("t5Kill") Integer t5Kill, @Param("death") Integer death);

    List<Integer> getHasDataDay(@Param("unionId") Long unionId, @Param("server") Integer server);

    List<StatDto> selectMemberStatDownloadByDay(@Param("unionId") Long unionId, @Param("server") Integer server, @Param("day") Integer day);
}